#!/usr/bin/env node
const fs=require('fs'),
      src=process.argv[2],
      dst=process.argv[3];

//实现内容的复制

let srcStream=fs.createReadStream(src),
    dstStream=fs.createWriteStream(dst);

srcStream.pipe(dstStream);

dstStream.on('close',()=>{

//实现权限的复制
  fs.chmodSync(dst,fs.statSync(src).mode);

});
